package com.meta.platform.contract.intf.enums;

/**
 * 业务实体类型枚举
 */
public enum PlanFundStatusEnum {

    NONE("unfund", "未回款"),
    PART("partial_return", "部分回款"),
    COMPLETE("fund_complete","回款完成"),
    ;

    PlanFundStatusEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    private String code;
    private String desc;

    public static PlanFundStatusEnum getEnumByCode(Object code){
        if (code == null){
            return null;
        }
        for (PlanFundStatusEnum value : PlanFundStatusEnum.values()) {
            if (value.code.equals(code)){
                return value;
            }
        }

        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
